package com.mxpio.framework.dbconsole.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

import com.mxpio.framework.common.ds.DataSet;
import com.mxpio.framework.security.base.entity.BaseEntity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_DB_DATASET")
@Schema(description="Db数据集")
public class DbDataSet extends BaseEntity implements DataSet {

	@Id
	@Schema(description = "编码")
	@Column(name = "CODE_")
	private String code;

	@Schema(description = "名称")
	@Column(name = "NAME_")
	private String name;

	@Schema(description = "数据库ID")
	@Column(name = "DB_ID_")
	private String dbId;

	@Schema(description = "SQL")
	@Column(name = "SQL_STR_")
	private String sqlStr;

	@Override
	public String getType() {
		return "DB";
	}

}
